<?php

declare(strict_types=1);
/**
 * @copyright 深圳市易果网络科技有限公司
 * @version 1.0.0
 * @link https://dayiguo.com
 */

namespace App\Constants;

/**
 * 常量合集
 *
 * @author 刘兴永(aile8880@qq.com)
 * @package App\Constants
 */
class Constants
{
    // Token to Request Header
    const AUTHORIZATION = 'Authorization';

    //游客
    const TOURIST = 'Tourist';

    // 版权
    const COPYRIGHT = '深圳刷脸兔科技有限公司';

    // 超级管理员ID
    const SUPER_ADMIN_ID = 1;

    // 验证码Redis前缀
    const CODE_REDIS_PREFIX = 'codeBy:';

    // 验证码有效期
    const CODE_TIMEOUT = 1800;

    // 验证码间隔时间
    const CODE_LIMIT_SECOND = 120;

    // 文件类型白名单
    const UPLOADS_CONFIG = [
        [
            'directory' => 'images',
            'mime' => ['image/jpg', 'image/jpeg', 'image/png', 'image/gif', 'image/bmp'],
            'maxSize' => 2097152
        ],
        [
            'directory' => 'videos',
            'mime' => ['video/mpeg', 'video/x-msvideo', 'video/mp4', 'application/mp4', 'video/x-flv', 'video/x-m4v', 'video/ogg', 'application/octet-stream', 'application/octet-stream'],
            'maxSize' => 10485760
        ]
    ];

    // 权限白名单
    const AUTH_WHITE_LIST = [
        'auth/login',
        'auth/logout',
        'user/info',
        'user/nav'
    ];

    // Token有效期
    const TOKEN_EXPIRE = 2592000;

    // Token续期时间
    const TOKEN_REFRESH = 604800;
}
